package com.xy.xymall.order;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.config.annotation.web.http.EnableSpringHttpSession;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * @author XY
 * @date 2021/1/21 15:44
 * @Description
 *
 * 事务失效问题，
 *      同一个对象内事务方法互调默认失效，原因：绕过了代理对象
 *      事务是使用代理对象来控制的
 *     解决：使用代理对象来调用事务方法
 *      1、引入aop
 *      2、开启aspectJ动态代理
 */
@SpringBootApplication
@EnableRabbit
@EnableDiscoveryClient
@EnableRedisHttpSession
@EnableFeignClients
public class XymallOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(XymallOrderApplication.class, args);
    }

}
